<template>
  <div class="login">
    <div class="container">
      <div class="avatar">
        <img src="../assets/head.png" alt="" />
      </div>
      <el-input
        v-model="username"
        placeholder="请输入用户名称"
        prefix-icon="el-icon-user-solid"
      >
      </el-input>
      <el-input
        v-model="password"
        placeholder="请输入密码"
        prefix-icon="el-icon-key"
      >
      </el-input>
      <el-button class="login-btn" type="primary">登录</el-button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      username: '',
      password: '',
    };
  },
};
</script>

<style lang="less" scoped>
.login {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #2f4050;
  .container {
    position: absolute;
    left: 0;
    right: 0;
    width: 400px;
    padding: 0px 40px 15px 40px;
    margin: 200px auto;
    background: white;
    .avatar {
      position: relative;
      left: 50%;
      width: 120px;
      height: 120px;
      margin-left: -60px;
      margin-top: -60px;
      box-sizing: border-box;
      border-radius: 50%;
      border: 10px solid rgb(40, 159, 228);
      background-color: #fff;
      box-shadow: 0 1px 5px #2f4050;
      overflow: hidden;
      img {
        width: 100px;
      }
    }
    .login-btn {
      width: 100%;
    }
  }
}
.el-input {
  margin-top: 20px;
}

.el-button {
  margin-top: 20px;
}
</style>
